<template>
    <view-box style="background:#F2F6F7;">
      <div style="height:10px;"></div>
      <div v-if="positionid === 0">
        <p style="text-align: center;margin-top:100px;font-size:18px;color:#666;">没有评估</p>
      </div>
      <div v-if="positionid !== 0" class="backwidl">
      <div class="boru-roeu">
        <h3 style="color:#000;margin-left:3%;">评估说明</h3>
      </div>
      <div style="height:10px;"></div>
      <div class="">
        <div class="border-long" v-html="position.analysis">
      </div>     
      </div>

      <div style="height:1px;background:#f4f4f4;width:90%;margin-left:5%;margin-top:10px;"></div>
      <div style="height:30px;"></div>
       <div class="">
        <p align="center" style="font-size:17px;color: #000;padding:6px 0px;">天南山文化</p>
        <p align="center" style="font-size:17px;color: #000;padding:6px 0px;">祝您身体健康、吉祥如意！</p>
      </div>
      </div>
    </view-box>
</template>
<script>
import { ViewBox, Box } from 'vux'
// 引入当前图表配置需要用到的图表、组件

export default {
  name: 'echarts-radar',
  components: {
    ViewBox,
    Box
  },
  data () {
    return {
      renderer: 'canvas',
      position: {},
      timeNow: '',
      positionid: ''
    }
  },
  mounted () {
    this.getMyYiJing()
    this.getdatanew()
    if (!this.$store.state.auth.userInfo) {
      this.$store.dispatch('getUserInfo')
    }
  },
  computed: {
    // option 合并传入的数据，返回一个 echarts 的 配置项
    userInfo () {
      return this.$store.getters.userInfo
    }
  },
  methods: {
    getMyYiJing () {
      this.$http.get('/GetAssessment/' + this.userInfo.id + '?assessments_id' + this.$route.query.idoui).then(response => {
        this.position = response.data.data ? response.data.data : 0
        this.positionid = response.data.data.analysis ? response.data.data.analysis : 0
        console.log(this.position)
      }).catch(error => {
        console.log(error)
      })
    },
    getdatanew () {
      var date = new Date()
      var year = date.getFullYear()
      var currentdate = year
      this.timeNow = currentdate
    }
  }
}
</script>
<style scoped>
.wid-h4{
  width: 90%;
  margin-left: 5%;
  height: 40px;
  line-height: 40px;
}
.wid-p1{
  width: 90%;
  margin-left: 5%;
  height: auto;
  color: #8E8E8E;
  font-size: 15px;
  line-height: 40px;
}
.border-long{
  width: 94%;
  margin-left: 3%;
}
.margin-rada{
  font-size: 16px;
  margin-left: 7%;
  margin-right: 6px;
}
.margin-p-text{
  font-size: 16px;
  margin-left: 7%;
  margin-right: 7%;
  color: #8E8E8E;
}
.border-long p{
  width: 92%;
  margin-left: 4%;
}
.backwidl{
  width: 92%;
  margin-left: 4%;
  background: #fff;
  border-radius: 7px;
}
.boru-roeu{
  width: 100%;
  height: 50px;
  line-height: 50px;
  border-bottom: 1px solid #f4f4f4;
}
</style>

